package com.zsrt.java.day20161226.zzm.demo03;

import java.util.Scanner;

import org.junit.Test;

public class ElseIfTest {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		while(true){
			System.out.println("请输入您的成绩:");
			int grade=sc.nextInt();
			System.out.println(elseIfTest(grade));
			System.out.println("继续请按c,退出请按y");
			String temp = sc.next();
			if(temp.equals("y")){
				System.out.println("程序已经退出......");
				break;
			}
		}
		sc.close();
	}
	public static String elseIfTest(int grade){
		
	    String temp="";
		if(grade>=90){
			temp = "优秀";
		}else if(grade>=80){
			temp = "良好";
		}else if(grade>=70){
			temp = "差";
		}else{
			temp = "有问题";
		}
		return temp;
	}
}
